package com.zkingsoft.rhi.controller;


import com.alibaba.fastjson.JSONObject;
import com.zkingsoft.rhi.entity.ImmovableHistoricalRelicsNature;
import com.zkingsoft.rhi.handler.Result;
import com.zkingsoft.rhi.service.ImmovableHistoricalRelicsNatureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xieguo
 * @since 2020-11-17
 */
@Api(tags = "不可移动文物性质")
@RestController
@RequestMapping("/rhi/nature")
public class ImmovableHistoricalRelicsNatureController {

    @Autowired
    ImmovableHistoricalRelicsNatureService ihrns;

    /**
     * @author xieguo
     *  功能描述：不可移动文物性质字典表查询
     * @return com.alibaba.fastjson.JSONObject
     * @date 2020/11/18 10:47
     */
    @ApiOperation(value = "不可移动文物性质字典表查询")
    @GetMapping("/query")
    public JSONObject queryNature(){
        List<ImmovableHistoricalRelicsNature> list = ihrns.list(null);
        return Result.setResultByCodeAndMsgAndDate(Result.STATUS_SUCCESS,"查询成功",list,list.size());
    }

}

